<template>
  <div id="container">
    <h1>我是bigchild组件</h1>
    <button @click="transdata">给数据到小儿子</button>
  </div>
</template>

<script>
import bus from "../eventBus/eventBus.js";

export default {
  data() {
    return {
      bigchildtochild: "这是大儿子给小儿子的数据--bigtosmall",
    };
  },
  methods: {
    transdata() {
      bus.$emit("share", this.bigchildtochild);
    },
  },
};
</script>

<style scoped>
#container{
  background-color: aqua;
  height: 200px;
}
</style>